package com.bieber.dubbo;

import com.bieber.dubbo.model.User;
import com.bieber.dubbo.service.MyFirstDubboService;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by bieber on 2015/4/30.
 */
public class DemoConsumer {

    public static void main(String[] args){
        ApplicationContext context = new ClassPathXmlApplicationContext("classpath:/spring/*.xml");
        BeanFactory factory = context.getAutowireCapableBeanFactory();
        MyFirstDubboService myFirstDubboService = (MyFirstDubboService) factory.getBean("myFirstDubboService");
        User user=new User();
        user.setAge("23");
        user.setName("bieber");
        System.out.println(myFirstDubboService.sayHello(user));
    }
    
    
}
